package com.tdkj.model.common;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanFriend;
import com.tdkj.model.user.BeanUser;
/**
 * KyFriendlylink entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "common_photocategory")
public class BeanPhotoCategory extends BaseEntity{
	private String name;
	private Timestamp createtime;
	private String status;//是否已经审核
	private BeanUser user;
	private List<BeanFile> photos = new ArrayList<BeanFile>();

	@Column(name = "name", length = 40)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "status", length = 40)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userid")
	public BeanUser getUser() {
		return user;
	}

	public void setUser(BeanUser user) {
		this.user = user;
	}

	@Column(name = "createtime", length = 19)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "photocategory")
	public List<BeanFile> getPhotos() {
		return photos;
	}

	public void setPhotos(List<BeanFile> photos) {
		this.photos = photos;
	}
	

}